import React from 'react'
import { Routes , Route } from 'react-router-dom'
import Home from "../views/Home"
import Video from "../views/Video"
import Live from "../views/Live"
import User from "../views/User"
import Login from "../views/Login"
import MySearch from "../views/MySearch"
import LiveRoom from '../views/LiveRoom'
import Registe from "../views/Registe"
import ChangeInfo from "../components/User/ChangeInfo"
import OpenLive from "../components/User/OpenLive"
import CreateVideo from "../components/User/CreateVideo"
import VideoManage from '../components/User/VideoManage'
import ShowVideo from '../views/ShowVideo'


export default function index() {
  return (
      <Routes>
          <Route index element={<Home></Home>}></Route>
          <Route path='home' element={<Home></Home>}></Route>
          <Route path='video/:videoId' element={<ShowVideo></ShowVideo>}></Route>
          <Route path='video' element={<Video></Video>}></Route>
          <Route path='live/:liveId' element={<LiveRoom></LiveRoom>}></Route>
          <Route path='live' element={<Live></Live>}></Route>
          <Route path='user' element={<User></User>}>
            <Route index element={<ChangeInfo></ChangeInfo>}></Route>
            <Route path='changeInfo' element={<ChangeInfo></ChangeInfo>}></Route>
            <Route path='openLive' element={<OpenLive></OpenLive>}></Route>
            <Route path='createVideo' element={<CreateVideo></CreateVideo>}></Route>
            <Route path='videoManage' element={<VideoManage></VideoManage>}></Route>
          </Route>
          <Route path='search' element={<MySearch></MySearch>}></Route>
          <Route path='login' element={<Login></Login>}></Route>
          <Route path='registe' element={<Registe></Registe>}></Route>
      </Routes>
  )
}

// const routes = [
//   {
//     path: "/",
//     redirect: "/home",
//   },
//   {
//     path: "/home",
//     // component: Home

//   },
//   {
//     path: "/search/:content",
    
//   },
//   {
//     path: "/video",
    
//   },
//   {
//     path: "/video/:id"
//   },
//   {
//     path: "/live",

//   },
//   {
//     path: "/live/:id"

//   },
//   {
//     path: "/user"

//   },
//   {
//     path: "/login"
    
//   },
//   {
//     path: "register",

//   }
// ]


